package com.ruoyi.taskSys.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.taskSys.domain.MBuildingTask;
import com.ruoyi.taskSys.pojo.TaskRo;
import com.ruoyi.taskSys.service.IMBuildingTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 二维码生成Controller
 * 
 * @author ruoyi
 * @date 2024-07-29
 */
@RestController
@RequestMapping("/qrcode")
public class QrcodeController extends BaseController {
    @Autowired
    private IMBuildingTaskService mHouseholdTaskService;
    /**
     * 创建核酸二维码接口
     *
     * @author ruoyi
     * @date 2024-07-29
     */
    @GetMapping()
    public AjaxResult getQrcode()
    {
        return success(mHouseholdTaskService.getQrcode());
    }
    /**
     * 扫码完成楼栋核酸任务接口
     *
     * @author ruoyi
     * @date 2024-07-29
     */
    @PostMapping
    //
    public AjaxResult finishQrcode(@RequestBody TaskRo taskRo){
        return success(mHouseholdTaskService.finishQrcode(taskRo));
    }
}
